﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Document.aspx.cs" Inherits="Customer_Document"  MasterPageFile="../MasterPage.master" %>
<%@ OutputCache Duration="2" SqlDependency="CIM.Net:Dat_Stock" VaryByParam="none" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="Common" %>
<%@ Import Namespace="DAL" %>

<%@ Register src="../common/Pager.ascx" tagname="Pager" tagprefix="uc2" %>


<%@ Register src="Customer_Left.ascx" tagname="Customer_Left" tagprefix="uc1" %>


<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="2" width="100%" border="0">
	<tr>
        <td class="leftTd"  valign="top" width="20%">
            
            <uc1:Customer_Left ID="Customer_Left1" runat="server" />
            
        </td>
		<td width="80%" valign="top">
		<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
			<tr>
		        <td class="leftTd"  valign="top">
		        <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
		        	<tr>
		            	<td class="titleStyle"><%= WebUtility.GetTitleByMenu(MenuType) %></td>
		            </tr>
		        </table>
		         <br />
		          <table width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
	                <tr>
		                <td style="height: 30px;" class="banma22_1">&nbsp;客户名称：<asp:TextBox ID="CustName" 
                                runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;关键字：<asp:TextBox ID="Keyword" runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="submit" runat="server" Text=" 搜 索 " CssClass="button" 
                                onclick="submit_Click" />
		                </td>
	                </tr>
                    </table><br/>
                    <asp:ListView ID="lv_Doc" runat="server" ondatabound="lv_Doc_DataBound" 
                        onitemdatabound="lv_Doc_ItemDataBound" >
                       <LayoutTemplate>
                            <table id="table1"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066" >
                              <tr id="itemPlaceHolder" runat="server">
                              </tr>
                            </table>
                       </LayoutTemplate>
                       <ItemTemplate>
                              <tr>
                                <td width="5%" rowspan="5" class="banma22_2" style="height: 25px; width: 3%;"><%# Container.DataItemIndex+1 %></td>
                                <td width="20%" rowspan="5" class="banma22_2" style="height: 25px; width: 8%;"><%# new Account().GetAccountCompanyName((int)DataBinder.GetDataItem(Container)) %></td>
                                <td width="75%" class="banma22_2" style="height: 25px; width: 15%;">
                                服务器信息:<br>
                                <!----服务器信息Begin----->
                                <asp:ListView ID="lv_InfoServer" runat="server" DataKeyNames="ServerKey" OnItemDeleting="lv_InfoServer_ItemDeleting" >
                                   <LayoutTemplate>
                                       <table id="table1"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">计算机名称</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">MAC地址</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">IP地址</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">域管/用户名</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">密码</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">动态域名</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">管理信息</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">操作</td>
	                                      </tr>
                                          <tr id="itemPlaceholder" runat="server" ></tr><br />
                                        </table>
                                   </LayoutTemplate>
                                   <ItemTemplate>
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma22_2"><%# Container.DataItemIndex+1 %></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("ServerName")%></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("MAC")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("IP")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("UserName")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("Password")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("Domain")%></td>
 	                                        <td style="width: 8%;" class="banma22_2"><%# Eval("ManageInfo")%></td>
 	                                        <td style="width: 8%;" class="banma22_2">
                                                 <asp:LinkButton ID="edit" runat="server" PostBackUrl='<%# "Document_Add.aspx?menutype=411&activetab=0&dockey="+Eval("ServerKey") %>'>修改</asp:LinkButton>
                                                 <asp:LinkButton ID="delete" runat="server" CommandName="Delete" OnClientClick="return confirm('确认删除?');" >删除</asp:LinkButton>
 	                                        </td>
	                                      </tr>
                                   </ItemTemplate>
                                </asp:ListView>
                                <!----服务器信息End----->
                                <br>
                                </td>
	                          </tr>
                              <tr>
                                <td style="height: 25px; width: 75%;" class="banma22_2" align="left">
                                客户端信息：<br>
                                <!----客户端信息Begin----->
                                <asp:ListView ID="lv_InfoClient" runat="server" DataKeyNames="ClientKey" OnItemDeleting="lv_InfoClient_ItemDeleting">
                                   <LayoutTemplate>
                                       <table id="table2"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">计算机名称</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">MAC地址</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">本地IP地址</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">无线MAC地址</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">无线IP地址</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">用户名</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">密码</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">操作</td>
	                                      </tr>
                                          <tr id="itemPlaceholder" runat="server" ></tr><br />
                                        </table>
                                   </LayoutTemplate>
                                   <ItemTemplate>
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma22_2"><%# Container.DataItemIndex+1 %></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("ClientName")%></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("MAC")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("IP")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("WilessMAC")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("WirelessIP")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("UserName")%></td>
 	                                        <td style="width: 8%;" class="banma22_2"><%# Eval("Password")%></td>
 	                                        <td style="width: 8%;" class="banma22_2">
 	                                             <asp:LinkButton ID="edit" runat="server" PostBackUrl='<%# "Document_Add.aspx?menutype=411&activetab=1&dockey="+Eval("ClientKey") %>'>修改</asp:LinkButton>
                                                 <asp:LinkButton ID="delete" runat="server" CommandName="Delete" OnClientClick="return confirm('确认删除?');" >删除</asp:LinkButton>
 	                                        </td>
	                                      </tr>
                                   </ItemTemplate>
                                </asp:ListView>
                                <!----客户端信息End----->
                                <br>
                                </td>
                              </tr>
                              <tr>
                                <td style="height: 25px; width: 75%;" class="banma22_2" align="left">
                                网络/硬件：<br>
                                <!----网络/硬件Begin----->
                                <asp:ListView ID="lv_InfoDevice" runat="server" DataKeyNames="DeviceKey" OnItemDeleting="lv_InfoDevice_ItemDeleting">
                                   <LayoutTemplate>
                                       <table id="table2"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">外网(ISP/IP/Mask/GateWay/DNS)</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">ADSL型号/账号/密码</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">交换机型号</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">路由器型号</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">IP地址</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">登陆名</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">密码</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">操作</td>
	                                      </tr>
                                          <tr id="itemPlaceholder" runat="server" ></tr><br />
                                        </table>
                                   </LayoutTemplate>
                                   <ItemTemplate>
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma22_2"><%# Container.DataItemIndex+1 %></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("OutWeb")%></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("ADSL")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("SwitchModel")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("RouterModel")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("IP")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("UserName")%></td>
 	                                        <td style="width: 8%;" class="banma22_2"><%# Eval("Password")%></td>
 	                                        <td style="width: 8%;" class="banma22_2">
 	                                             <asp:LinkButton ID="edit" runat="server" PostBackUrl='<%# "Document_Add.aspx?menutype=411&activetab=2&dockey="+Eval("DeviceKey") %>'>修改</asp:LinkButton>
                                                 <asp:LinkButton ID="delete" runat="server" CommandName="Delete" OnClientClick="return confirm('确认删除?');" >删除</asp:LinkButton>
 	                                        </td>
	                                      </tr>
                                   </ItemTemplate>
                                </asp:ListView>
                                <!----网络/硬件End----->
                                <br>
                                </td>
                              </tr>
                              <tr>
                                <td style="height: 25px; width: 75%;" class="banma22_2" align="left">
                                办公/外设：<br>
                                <!----办公/外设Begin----->
                                <asp:ListView ID="lv_InfoOffice" runat="server" DataKeyNames="OfficeKey" OnItemDeleting="lv_InfoOffice_ItemDeleting">
                                   <LayoutTemplate>
                                       <table id="table2"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">名称/型号(打印机)</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">IP地址(打印机)</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">共享名(打印机)</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">接入点(打印机)</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">名称/型号(传真机)</td>
		                                    <td style="width: 8%;" class="banma1 TextCenters">直线号码(传真机)</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">分机号码(传真机)</td>
 	                                        <td style="width: 8%;" class="banma1 TextCenters">操作</td>
	                                      </tr>
                                          <tr id="itemPlaceholder" runat="server" ></tr><br />
                                        </table>
                                   </LayoutTemplate>
                                   <ItemTemplate>
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma22_2"><%# Container.DataItemIndex+1 %></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("P_Model")%></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("P_IP")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("P_ShareName")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("P_ConnectPoint")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("F_Model")%></td>
		                                    <td style="width: 8%;" class="banma22_2"><%# Eval("F_Tel")%></td>
 	                                        <td style="width: 8%;" class="banma22_2"><%# Eval("F_Ext")%></td>
 	                                        <td style="width: 8%;" class="banma22_2">
 	                                             <asp:LinkButton ID="edit" runat="server" PostBackUrl='<%# "Document_Add.aspx?menutype=411&activetab=3&dockey="+Eval("OfficeKey") %>'>修改</asp:LinkButton>
                                                 <asp:LinkButton ID="delete" runat="server" CommandName="Delete" OnClientClick="return confirm('确认删除?');" >删除</asp:LinkButton>
 	                                        </td>
	                                      </tr>
                                   </ItemTemplate>
                                </asp:ListView>
                                <!----办公/外设End----->
                                <br>
                                </td>
                              </tr>
                              <tr>
                                <td style="height: 25px; width: 75%;" class="banma22_2" align="left">
                                应用软件：<br>
                                <!----应用软件Begin----->
                                <asp:ListView ID="lv_InfoSoft" runat="server"  DataKeyNames="SoftKey" OnItemDeleting="lv_InfoSoft_ItemDeleting">
                                   <LayoutTemplate>
                                       <table id="table2"  runat="server" width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma1 TextCenters">序号</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">ERP软件名称</td>
                                            <td style="height: 25px; width: 8%;" class="banma1 TextCenters">服务器名称/IP/MAC</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">管理员</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">密码</td>
		                                    <td style="height: 25px; width: 8%;" class="banma1 TextCenters">操作</td>
	                                      </tr>
                                          <tr id="itemPlaceholder" runat="server" ></tr><br />
                                        </table>
                                   </LayoutTemplate>
                                   <ItemTemplate>
                                          <tr>
                                            <td style="height: 25px; width: 5%;" class="banma22_2"><%# Container.DataItemIndex+1 %></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("SoftName")%></td>
                                            <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("ServerName")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("Admin")%></td>
		                                    <td style="height: 25px; width: 8%;" class="banma22_2"><%# Eval("AdminPwd")%></td>
		                                    <td style="width: 8%;" class="banma22_2">
 	                                             <asp:LinkButton ID="edit" runat="server" PostBackUrl='<%# "Document_Add.aspx?menutype=411&activetab=4&dockey="+Eval("SoftKey") %>'>修改</asp:LinkButton>
                                                 <asp:LinkButton ID="delete" runat="server" CommandName="Delete" OnClientClick="return confirm('确认删除?');" >删除</asp:LinkButton>
 	                                        </td>
	                                      </tr>
                                   </ItemTemplate>
                                </asp:ListView>
                                <!----应用软件End----->
                                <br>
                                </td>
                              </tr> 
                      </ItemTemplate>
                    
	                  </asp:ListView>
	                   <!-- Page Begin -->
                    <asp:DataPager ID="DataPager1" runat="server" 
                        PagedControlID="lv_Doc" PageSize="20">
                                   <Fields>
                                    <asp:TemplatePagerField>
                                         <PagerTemplate>
                              
                              <table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
                                <tr>
                                    <td width="36%" height="30">
                                        页次：<b><%# WebUtility.GetCurrentPage(Container.StartRowIndex, Container.PageSize)%></b>/<b><%# WebUtility.GetTotalPage(Container.TotalRowCount, Container.PageSize)%></b>页 
                                        每页<b><%# Container.PageSize  %></b>条 共<b><%# Container.TotalRowCount %></b>条
                                    </td>
                                    <td width="64%" height="30" style="text-align: right;">
                                        分页：
                                        </PagerTemplate>
                                     </asp:TemplatePagerField>
                                     <asp:NextPreviousPagerField ButtonType="Image" FirstPageImageUrl="../images/first.gif" ShowFirstPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                     <asp:NumericPagerField CurrentPageLabelCssClass="SelectedPage" NumericButtonCssClass="NotSelectedPage" />
                                     <asp:NextPreviousPagerField ButtonType="Image" LastPageImageUrl="../images/last.gif"  ShowLastPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" />
                                     <asp:TemplatePagerField>
                                        <PagerTemplate>
                                               转到：
                                            <asp:DropDownList ID="PageList" runat="server" AutoPostBack="true" 
                                                onselectedindexchanged="PageList_SelectedIndexChanged" >
                                            </asp:DropDownList>
                                                </td>
                                            </tr>
                                        </table>
                                         </PagerTemplate>
                                     </asp:TemplatePagerField>
                                   </Fields>
                        </asp:DataPager>
                        <!-- Page End -->
        </td>
    </tr>
</table>
<asp:ObjectDataSource ID="DocOBJ" runat="server" EnablePaging="True" TypeName="DAL.Document`1[[DAL.InfoServer, DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" 
                MaximumRowsParameterName="MaxRows" OldValuesParameterFormatString="" 
                SelectCountMethod="SelectDocAccountCount" SelectMethod="SelectDocAccountKey" 
                StartRowIndexParameterName="StartRowIndex">
    <SelectParameters>
        <asp:Parameter Name="StartRowIndex" />
        <asp:Parameter Name="MaxRows" />
        <asp:ControlParameter ControlID="CustName" Name="CustName" 
            PropertyName="Text" />
        <asp:ControlParameter ControlID="Keyword" Name="Keyword" PropertyName="Text" />
    </SelectParameters>
            </asp:ObjectDataSource>
</asp:Content>

